#pragma once
#include <list>
#include <string>
namespace Level5
{
	class Preprocessor
	{
	public:
		class Token
		{
		public:
			Token() = default;
			Token(const Preprocessor*);
			Token(std::u16string fileName, size_t line);
			Token(std::u16string fileName, std::u32string value, size_t line, size_t row);
			std::u32string value, fileName;
			size_t line{ 0 }, row{ 0 };
			enum class Type :uint64_t
			{
				Nul,
				Operator,
				Id,
				String,
				Max
			}type{ Type::Nul };
		};
	protected:
		std::u32string inFile, fileName;
		size_t line, row, inFileSize;
		virtual Token GetToken() = 0;
	public:
		Preprocessor();
		Preprocessor(const Preprocessor&) = delete;
		virtual std::list<Level5::Preprocessor::Token>* operator()(const char16_t* fileName);
		static bool isIdentifier(const std::u32string&);
	};
}